Medical systems including an imaging system, for example, a Computed Tomography (CT) system and a radiotherapy (RT) system, for example, a LINAC, etc., may be used in medical diagnosis or treatment. A subject, such as a patient, may be scanned to obtain CT data. The gantry may rotate around the subject during the scan. The sag of one or more components of the medical system may result in deviations of the medical system from its desired position during gantry rotation. There is a need for a system and method to calibrate the medical system geometry.